package com.funtl.spring.cloud.alibaba.provider.Controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProviderController {
    @RequestMapping("/echo/provider/{str}")
    public String echo(@PathVariable("str") String str){
        return "hello nacos provider:"+str;
    }

    @Value("${server.port}")
    private String port;

    /**
     * 用于演示feign调用服务
     * @return
     */
    @RequestMapping("/provider/fn")
    public String fn(){
        return "你访问的服务端口是:"+port;
    }


}
